home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5285 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  913 b 

  1. Path: news1.cris.com!Crawford
  2. From: Crawford@cris.com (CRAWFORD)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: ANSI var-arglist processing
  5. Date: 9 Feb 1996 16:58:54 GMT
  6. Organization: Concentric Internet Services
  7. Message-ID: <4ffuge$j3@spectator.cris.com>
  8. References: <311B1EF2.7673@exel.co.uk>
  9. Reply-To: crawford@iac.net
  10. NNTP-Posting-Host: voyager-fddi.cris.com
  11.  
  12. Jason Hambleton <jkh@exel.co.uk> writes:
  13. >func2(char *fmt, ...)
  14. >{
  15. >    va_list args;
  16. >    char buffer[81];
  17. >    va_start(args, fmt);
  18. >    vsprintf(buffer, fmt, args);
  19. >    va_end(args);
  20. >    printf("RESULT = (%s)\n", buffer);
  21. >}
  22.  
  23. >func1(char *fmt, ...)
  24. >{
  25. >    /* How do I pass the arg-list from here, to the next function */
  26.  
  27. >    func2(fmt, ????????);
  28. >}
  29.  
  30.     The answer lies in func2. How did you pass the variable
  31. argument list to vsprintf?
  32.  
  33. --
  34. "They sentenced me to twenty years of boredom, for trying to change
  35. the system from within."
  36.  
  37. Robert Crawford                crawford@iac.net
  38.